<template>
  <div class="org-item-wrapper">
    <div class="org-item">
      <div class="org-icon">
        <img :src="icon" />
      </div>
      <div class="org-name ellipsis">
        {{ org.name }}
      </div>
      <img src="@/assets/icon/icon-more.png" class="icon-more" />
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import JuIcon from '../assets/ju-icon.png'
import ChuIcon from '../assets/chu-icon.png'
import KeIcon from '../assets/ke-icon.png'

interface IProp {
  org: IOrg
}

const props = defineProps<IProp>()

const icon = computed(() => {
  // TODO switch org type
  return JuIcon
})
</script>

<style lang="less" scoped>
.org-item-wrapper {
  padding: 0px 12px;
  background: #fff;
}
.org-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e9e9e9;
  padding: 8.75px 0px;
  width: 100%;
  .org-icon {
    margin-right: 10.5px;
    img {
      width: 30px;
      height: 30px;
    }
  }

  .org-name {
    flex-grow: 1;
    font-weight: bold;
    font-size: 16px;
    color: #0e0d16;
  }

  .icon-more {
    margin-left: 12px;
    height: 24px;
    width: 12px;
  }
}
</style>
